#!/bin/bash
# 图标规范检查
icon_path="src-tauri/icons/256x256.png"
if [ ! -f "$icon_path" ]; then
  echo "❌ 缺失256px图标文件"
  exit 1
fi

# 主色验证
npm_px_path="node_modules/.bin/pixelmatch"
if [ -x "$npm_px_path" ]; then
  $npm_px_path screenshot.png reference.png diff.png 0.1
fi

# 验证主题色准确性
node scripts/color-validator.js .classifier-box #1890ff
node scripts/color-validator.js .placeholder #8c8c8c

# 检查必填标记
if ! grep -q "required-marker" src/style.css; then
  echo "❌ 缺失必填星号样式"
  exit 1
fi